package com.fsl.springbootdesignpattern.d_proxy.StaticProxy;

/**
 * @author sj2
 * 黄牛
 */
public class Scalper implements MyProxy {

    private MyProxy myProxy;


    public Scalper(MyProxy myProxy){
        this.myProxy = myProxy;
    }

    @Override
    public void buyTicket() {
        doBefore();

        myProxy.buyTicket();

        doAfter();
    }


    private void doBefore(){
        System.out.println("买票开始之前......");
    }

    private void doAfter(){
        System.out.println("买票开始之后......");
    }
}
